package com.bill99.rpc.registry;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanClassLoaderAware;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.util.ClassUtils;

import com.bill99.rpc.config.RegistryConfig;

/**
 * @author sheng.zhang
 */
public class RegistrySupport extends RegistryConfig implements
		InitializingBean, BeanClassLoaderAware, ApplicationContextAware {
	private static final long serialVersionUID = 1L;
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	protected ClassLoader beanClassLoader = ClassUtils.getDefaultClassLoader();
	protected ApplicationContext applicationContext = null;	
	@Override
	public void afterPropertiesSet() throws Exception {

	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		this.applicationContext = applicationContext;
	}

	@Override
	public void setBeanClassLoader(ClassLoader beanClassLoader) {
		this.beanClassLoader = beanClassLoader;
	}

}
